import request from '@/utils/request'
export function getCaseEmployeeTypes() {
  return request({
    url: '/api/Case/CaseContribution/GetCaseEmployeeTypes',
    method: 'get',
  })
}

export function getContributionProjects() {
  return request({
    url: '/api/Case/CaseContribution/GetContributionProjects',
    method: 'get',
  })
}

export function getContributions(params) {
  return request({
    url: '/api/Case/CaseContribution/GetContributions',
    method: 'get',
    params
  })
}

export function getEmployees() {
  return request({
    url: '/api/Case/CaseContribution/GetEmployees',
    method: 'get',
  })
}

export function calculateWeights(caseId, type) {
  return request({
    url: '/api/Case/CaseContribution/CalculateWeights',
    method: 'get',
    params: {
      caseId,
      type
    }
  })
}

export function addContribution(data) {
  return request({
    url: '/api/Case/CaseContribution/AddContribution',
    method: 'post',
    data
  })
}

export function editContribution(data) {
  return request({
    url: '/api/Case/CaseContribution/EditContribution',
    method: 'post',
    data
  })
}

export function deleteContribution(id) {
  return request({
    url: '/api/Case/CaseContribution/DeleteContribution',
    method: 'get',
    params: {
      id
    }
  })
}

export function contributionSure(caseId) {
  return request({
    url: '/api/Case/CaseContribution/ContributionSure',
    method: 'get',
    params: {
      caseId
    }
  })
}

export function contributionUnsure(caseId) {
  return request({
    url: '/api/Case/CaseContribution/ContributionUnsure',
    method: 'get',
    params: {
      caseId
    }
  })
}